/**
 * 
 */
package puzzle;

import java.util.LinkedHashSet;
import java.util.Set;

import aima.core.agent.Action;
import aima.core.search.framework.ActionsFunction;

/**
 * @author Luciana
 * 
 */
public class PuzzleActionsFunction implements ActionsFunction {

    private static PuzzleActionsFunction instance;

    private PuzzleActionsFunction() {

    }

    public static PuzzleActionsFunction getInstance() {
        if (instance == null) {
            instance = new PuzzleActionsFunction();
        }

        return instance;
    }

    /*
     * (non-Javadoc)
     * 
     * @see aima.core.search.framework.ActionsFunction#actions(java.lang.Object)
     */
    @Override
    public Set<Action> actions(Object s) {
        Set<Action> actions = new LinkedHashSet<Action>();
        actions.add(PuzzleBoard.C_DER);
        actions.add(PuzzleBoard.C_IZQ);
        actions.add(PuzzleBoard.E_DER);
        actions.add(PuzzleBoard.E_IZQ);
        actions.add(PuzzleBoard.N_DER);
        actions.add(PuzzleBoard.N_IZQ);
        actions.add(PuzzleBoard.O_DER);
        actions.add(PuzzleBoard.O_IZQ);
        actions.add(PuzzleBoard.S_DER);
        actions.add(PuzzleBoard.S_IZQ);
        return actions;
    }

}

